const {
  execSync
} = require('child_process')
const path = require('path')

const rootPath = path.resolve(__dirname, '../')
console.log('npm构建-开始')
execSync(`./cli build-npm --project ${rootPath}`, {
  encoding: 'utf-8',
  cwd: '/Applications/wechatwebdevtools.app/Contents/MacOS/'
})
console.log('npm构建-成功')

// macOS: <安装路径>/Contents/MacOS/cli  -->默认 /Applications/wechatwebdevtools.app/Contents/MacOS/cli 
// Windows: <安装路径>/cli.bat